var proxy = "PROXY 127.0.0.1:1080";

var direct = 'DIRECT';

var domainsUsingProxy = [
    "google.com","google.com.hk","youtube.com","googlevideo.com",
    "github.com","github.io","githubusercontent.com","githubassets.com",
    "twitter.com","x.com","twimg.com","live.com",
    "facebook.com","facebook.net","fbcdn.net",
    "instagram.com","cdninstagram.com",
    "tiktok.com",
    //"bing.com","bing.cn","bing.net","bingapis.com",
    "whatsapp.com","whatsapp.net",
    "reddit.com","redd.it",
    "stackoverflow.com","wikipedia.org","godaddy.com","cloudflare.com","docker.com","segment.io","unpkg.com",
    "ent.com","ytimg.com","jsdelivr.com","tv.apple.com"
    ];

function isInProxyDomain(host) {
    for (var i = 0; i < domainsUsingProxy.length; i++) {
        var domain = domainsUsingProxy[i];
        if (host === domain || host.endsWith('.' + domain)) {
            return true;
        }
    }
    return false;
}

function FindProxyForURL(url, host) {
    if (isInProxyDomain(host)) {
        return proxy;
    }
    return direct;
}